* NOTE: You need to set the Stata working directory to the path
* where the data file is located.

set more off

clear
quietly infix                   ///
  str     year       1-9        ///
  str     regiona    10-10      ///
  str     divisiona  11-11      ///
  str     state      12-35      ///
  str     statea     36-37      ///
  str     county     38-94      ///
  str     countya    95-97      ///
  str     cousuba    98-102     ///
  str     placea     103-107    ///
  str     aianhha    108-111    ///
  str     anrca      112-116    ///
  str     cbsaa      117-121    ///
  str     csaa       122-124    ///
  str     metdiva    125-129    ///
  str     nectaa     130-134    ///
  str     cnectaa    135-137    ///
  str     nectadiva  138-142    ///
  str     uaa        143-147    ///
  str     cdcurra    148-149    ///
  str     sdelma     150-154    ///
  str     sdseca     155-159    ///
  str     sdunia     160-164    ///
  str     puma5a     165-169    ///
  str     name_e     170-1169   ///
  double  nt7e001    1170-1178  ///
  double  nt7e002    1179-1187  ///
  double  nt7e003    1188-1196  ///
  double  nt7e004    1197-1205  ///
  double  nt7e005    1206-1214  ///
  double  nt7e006    1215-1223  ///
  double  nt7e007    1224-1232  ///
  double  nt7e008    1233-1241  ///
  double  nt7e009    1242-1250  ///
  double  nt7e010    1251-1259  ///
  double  nt7e011    1260-1268  ///
  double  nt7e012    1269-1277  ///
  double  nt7e013    1278-1286  ///
  double  nt7e014    1287-1295  ///
  double  nt7e015    1296-1304  ///
  double  nt7e016    1305-1313  ///
  double  nt7e017    1314-1322  ///
  double  nt7e018    1323-1331  ///
  double  nt7e019    1332-1340  ///
  double  nt7e020    1341-1349  ///
  double  nt7e021    1350-1358  ///
  double  nt7e022    1359-1367  ///
  double  nt7e023    1368-1376  ///
  double  nt7e024    1377-1385  ///
  double  nt7e025    1386-1394  ///
  str     name_m     1395-2394  ///
  double  nt7m001    2395-2403  ///
  double  nt7m002    2404-2412  ///
  double  nt7m003    2413-2421  ///
  double  nt7m004    2422-2430  ///
  double  nt7m005    2431-2439  ///
  double  nt7m006    2440-2448  ///
  double  nt7m007    2449-2457  ///
  double  nt7m008    2458-2466  ///
  double  nt7m009    2467-2475  ///
  double  nt7m010    2476-2484  ///
  double  nt7m011    2485-2493  ///
  double  nt7m012    2494-2502  ///
  double  nt7m013    2503-2511  ///
  double  nt7m014    2512-2520  ///
  double  nt7m015    2521-2529  ///
  double  nt7m016    2530-2538  ///
  double  nt7m017    2539-2547  ///
  double  nt7m018    2548-2556  ///
  double  nt7m019    2557-2565  ///
  double  nt7m020    2566-2574  ///
  double  nt7m021    2575-2583  ///
  double  nt7m022    2584-2592  ///
  double  nt7m023    2593-2601  ///
  double  nt7m024    2602-2610  ///
  double  nt7m025    2611-2619  ///
  using `"nhgis0050_ds188_20113_2011_county.dat"'


format nt7e001   %9.0f
format nt7e002   %9.0f
format nt7e003   %9.0f
format nt7e004   %9.0f
format nt7e005   %9.0f
format nt7e006   %9.0f
format nt7e007   %9.0f
format nt7e008   %9.0f
format nt7e009   %9.0f
format nt7e010   %9.0f
format nt7e011   %9.0f
format nt7e012   %9.0f
format nt7e013   %9.0f
format nt7e014   %9.0f
format nt7e015   %9.0f
format nt7e016   %9.0f
format nt7e017   %9.0f
format nt7e018   %9.0f
format nt7e019   %9.0f
format nt7e020   %9.0f
format nt7e021   %9.0f
format nt7e022   %9.0f
format nt7e023   %9.0f
format nt7e024   %9.0f
format nt7e025   %9.0f
format nt7m001   %9.0f
format nt7m002   %9.0f
format nt7m003   %9.0f
format nt7m004   %9.0f
format nt7m005   %9.0f
format nt7m006   %9.0f
format nt7m007   %9.0f
format nt7m008   %9.0f
format nt7m009   %9.0f
format nt7m010   %9.0f
format nt7m011   %9.0f
format nt7m012   %9.0f
format nt7m013   %9.0f
format nt7m014   %9.0f
format nt7m015   %9.0f
format nt7m016   %9.0f
format nt7m017   %9.0f
format nt7m018   %9.0f
format nt7m019   %9.0f
format nt7m020   %9.0f
format nt7m021   %9.0f
format nt7m022   %9.0f
format nt7m023   %9.0f
format nt7m024   %9.0f
format nt7m025   %9.0f

label var year      `"Data File Year"'
label var regiona   `"Region Code"'
label var divisiona `"Division Code"'
label var state     `"State Name"'
label var statea    `"State Code"'
label var county    `"County Name"'
label var countya   `"County Code"'
label var cousuba   `"County Subdivision Code"'
label var placea    `"Place Code"'
label var aianhha   `"American Indian Area/Alaska Native Area/Hawaiian Home Land Code"'
label var anrca     `"Alaska Native Regional Corporation Code"'
label var cbsaa     `"Metropolitan Statistical Area/Micropolitan Statistical Area Code"'
label var csaa      `"Combined Statistical Area Code"'
label var metdiva   `"Metropolitan Division Code"'
label var nectaa    `"New England City and Town Area Code"'
label var cnectaa   `"Combined New England City and Town Area Code"'
label var nectadiva `"New England City and Town Area Division Code"'
label var uaa       `"Urban Area Code"'
label var cdcurra   `"Congressional District (111th Congress) Code"'
label var sdelma    `"School District (Elementary)/Remainder Code"'
label var sdseca    `"School District (Secondary)/Remainder Code"'
label var sdunia    `"School District (Unified)/Remainder Code"'
label var puma5a    `"Public Use Microdata Sample Area (PUMA) Code"'
label var name_e    `"Estimates: Area Name"'
label var nt7e001   `"Estimates: Total"'
label var nt7e002   `"Estimates: No schooling completed"'
label var nt7e003   `"Estimates: Nursery school"'
label var nt7e004   `"Estimates: Kindergarten"'
label var nt7e005   `"Estimates: 1st grade"'
label var nt7e006   `"Estimates: 2nd grade"'
label var nt7e007   `"Estimates: 3rd grade"'
label var nt7e008   `"Estimates: 4th grade"'
label var nt7e009   `"Estimates: 5th grade"'
label var nt7e010   `"Estimates: 6th grade"'
label var nt7e011   `"Estimates: 7th grade"'
label var nt7e012   `"Estimates: 8th grade"'
label var nt7e013   `"Estimates: 9th grade"'
label var nt7e014   `"Estimates: 10th grade"'
label var nt7e015   `"Estimates: 11th grade"'
label var nt7e016   `"Estimates: 12th grade, no diploma"'
label var nt7e017   `"Estimates: Regular high school diploma"'
label var nt7e018   `"Estimates: GED or alternative credential"'
label var nt7e019   `"Estimates: Some college, less than 1 year"'
label var nt7e020   `"Estimates: Some college, 1 or more years, no degree"'
label var nt7e021   `"Estimates: Associate's degree"'
label var nt7e022   `"Estimates: Bachelor's degree"'
label var nt7e023   `"Estimates: Master's degree"'
label var nt7e024   `"Estimates: Professional school degree"'
label var nt7e025   `"Estimates: Doctorate degree"'
label var name_m    `"Margins of error: Area Name"'
label var nt7m001   `"Margins of error: Total"'
label var nt7m002   `"Margins of error: No schooling completed"'
label var nt7m003   `"Margins of error: Nursery school"'
label var nt7m004   `"Margins of error: Kindergarten"'
label var nt7m005   `"Margins of error: 1st grade"'
label var nt7m006   `"Margins of error: 2nd grade"'
label var nt7m007   `"Margins of error: 3rd grade"'
label var nt7m008   `"Margins of error: 4th grade"'
label var nt7m009   `"Margins of error: 5th grade"'
label var nt7m010   `"Margins of error: 6th grade"'
label var nt7m011   `"Margins of error: 7th grade"'
label var nt7m012   `"Margins of error: 8th grade"'
label var nt7m013   `"Margins of error: 9th grade"'
label var nt7m014   `"Margins of error: 10th grade"'
label var nt7m015   `"Margins of error: 11th grade"'
label var nt7m016   `"Margins of error: 12th grade, no diploma"'
label var nt7m017   `"Margins of error: Regular high school diploma"'
label var nt7m018   `"Margins of error: GED or alternative credential"'
label var nt7m019   `"Margins of error: Some college, less than 1 year"'
label var nt7m020   `"Margins of error: Some college, 1 or more years, no degree"'
label var nt7m021   `"Margins of error: Associate's degree"'
label var nt7m022   `"Margins of error: Bachelor's degree"'
label var nt7m023   `"Margins of error: Master's degree"'
label var nt7m024   `"Margins of error: Professional school degree"'
label var nt7m025   `"Margins of error: Doctorate degree"'


